import React from 'react';
import {connect} from 'dva/index';
import {Button, Checkbox, Col, Form, Input, InputNumber, Radio, Row, Tabs} from 'antd';
import SingleDragger from "../common/SingleDragger";
import {download, fileUpload, siFileUpload} from '../../utils/commons';
import Constants from '../../utils/Constants';

const dateFormat = 'YYYY-MM-DD';
const FormItem = Form.Item;
const TabPane = Tabs.TabPane;
const CheckboxGroup = Checkbox.Group;
const RadioGroup = Radio.Group;
const R = require("ramda");

const orderSupplementInfo = Form.create()(class OrderSupplementInfo extends React.Component {
    constructor(props) {
        super(props);
    }

    handleExportBillOfLading = () => { 
        let url =  apiPath.mc + "/api/file/export/billOfLading";
        let conditions = null;
        download(url, conditions);
    }

    ExportBillOfLading = () =>{          //导出提单补料确认件
        let orderId = R.isNil(this.props.order.order.id) ? "" : this.props.order.order.id;
        let url =  apiPath.mc + "/api/file/export/billOfLading/" + orderId;
        let conditions = null;
        download(url, conditions);
    }

    form = {};
    flag = true;
    handleCollectForm = () => {
        this.props.form.validateFields({ force: true }, (errors, values) => {
            if (errors) {
                this.flag = false;
                return;
            } else {
                this.flag = true;
                this.form = { ...values };
            }
        })
        return this.flag;
    }


    checkOrderSupplementInfo = () => {
        if (this.handleCollectForm()) {
            return this.form;
        }
    }

    onAnalysisFile = () => {
        let siUrl = this.refs.siUrl.getUrl();
        if (!this.refs.siUrl.getUrl() && this.refs.siUrl.getFiles().length > 0) {
            fileUpload({
                id: this.props.order.odSi.id,
                modules: Constants.ORDERSI_MODULES[1],
                data: this.refs.siUrl.getFiles(),
                onSuccess: this.closeWin,
                onFail: this.closeWin
            });
        }

        siFileUpload({
            orderId: this.props.orderId,
            data: this.refs.siUrl.getFiles(),
            onSuccess: () =>{
                this.props.dispatch({
                    type: 'order/getById',
                    payload: {
                        receiptId: this.props.receiptId
                    }
                });
            },
            onFail: this.closeWin
        });
    }

    render() {
        const { getFieldDecorator } = this.props.form;
        let dataSource = this.props.order.odSi ? this.props.order.odSi : {};
        let formItemLayout = { labelCol: { span: 8 }, wrapperCol: { span: 14 } };
        let ladingBillUrl = dataSource.ladingBillUrl ? dataSource.ladingBillUrl : undefined;
        let siUrl = dataSource.siUrl ? dataSource.siUrl : undefined;
        const divWithOutBorderBottom = {
            display: 'flex',
            borderRight: '1px solid #e9e9e9',
            borderLeft: '1px solid #e9e9e9',
            borderTop: '1px solid #e9e9e9',
            borderSpacing: 0,
            lineHeight: 3.5,
            textAlign: 'left',
        }

        const columnBreak = {
            display: 'flex',
            borderRight: '1px solid #e9e9e9',
            borderLeft: '1px solid #e9e9e9',
            borderTop: '1px solid #e9e9e9',
            borderSpacing: 0,
            textAlign: 'left',
        }

        const fileBorderBottom = {
            display: 'flex',
            borderRight: '1px solid #5993F4',
            borderLeft: '1px solid #5993F4',
            borderBottom: '1px solid #5993F4',
            borderTop: '1px solid #5993F4'
        }
        return (
            <div>
                <Form>
                    <Tabs tabPosition={'top'}>
                        <TabPane tab="提单补料" key="1">
                            <div style={Object.assign({}, { marginTop: 5, width: '100%' }, fileBorderBottom)}>
                                <div>
                                    <Row>
                                        <Col span={6} style={{ marginTop: 10, marginLeft: 65, marginBottom: 20 }}>
                                            <a href="#" onClick={this.handleExportBillOfLading.bind(this)}>下载补料模版</a>
                                        </Col>
                                    </Row>
                                    <Row>
                                        <Col span={24} style={{ marginLeft: 45 }}>
                                            <FormItem {...formItemLayout} label={<span className="ant-form-item-required">上传补料信息</span>} hasFeedback>
                                                <SingleDragger url={siUrl} ref="siUrl" dataSource={dataSource} module={Constants.ORDERSI_MODULES[1]} disabled={dataSource.status == "2" || dataSource.status == "3" ? true : this.props.disabled} />
                                            </FormItem>
                                        </Col>
                                    </Row>
                                    <Row>
                                        <Col span={4} style={{ marginLeft: 200, marginBottom: 10, display: dataSource.status == "2" || dataSource.status == "3" ? 'none' : 'inline-block' }}>
                                            <Button onClick={this.onAnalysisFile.bind(this)}>点击解析</Button>
                                        </Col>
                                    </Row>
                                </div>
                            </div>

                            <div style={Object.assign({}, { marginTop: 10, marginBottom: 18, width: '100%' }, fileBorderBottom)}>
                                <div style={{ width: '90%', marginLeft: 50 }}>
                                    <div style={{ textAlign: 'left', marginTop: 20, marginBottom: 10 }}>
                                        <div><span><b><font size="2">GUANGZHOU HENDA SPECIALTY OF SUPPLY CHAIN MANAGEMENT CO, LTD</font></b></span></div>
                                    </div>

                                    <div style={Object.assign({}, { lineHeight: 3.5 }, columnBreak)}>
                                        <div style={{ width: '45%', marginLeft: 10, borderRight: '1px solid #e9e9e9' }}>
                                            <div>Shipper &nbsp;&nbsp;
                                            <span>
                                                    {getFieldDecorator('shipper', {
                                                        initialValue: dataSource.shipper
                                                    })(
                                                        <Input.TextArea maxLength="100" disabled={dataSource.status == "2" || dataSource.status == "3" ? true : this.props.disabled} style={{ width: '82%', marginTop: 5, marginBottom: 5, textAlign: 'center' }} autosize={{ minRows: 5, maxRows: 6 }} />
                                                        )}
                                                </span>
                                            </div>
                                        </div>
                                        <div style={{ width: '55%', marginLeft: 10, borderRight: '1px solid #e9e9e9' }}>
                                            <div>Bill Of Lading No&nbsp;&nbsp;
                                            <span>
                                                    {getFieldDecorator('ladingBill', {
                                                        initialValue: dataSource.ladingBill
                                                    })(
                                                        <Input maxLength="50" disabled={dataSource.status == "2" || dataSource.status == "3" ? true : this.props.disabled} style={{ width: '75%', marginTop: 5, marginBottom: 5, textAlign: 'center' }} />
                                                        )}
                                                </span>
                                            </div>
                                            <div style={{ borderTop: '1px solid #e9e9e9' }}>Booking No &nbsp;&nbsp;
                                            <span>
                                                    {getFieldDecorator('soNo', {
                                                        initialValue: dataSource.soNo
                                                    })(
                                                        <Input maxLength="50" disabled={dataSource.status == "2" || dataSource.status == "3" ? true : this.props.disabled} style={{ width: '81%', marginTop: 5, marginBottom: 5, textAlign: 'center' }} />
                                                        )}
                                                </span>
                                            </div>
                                            <div style={{ borderTop: '1px solid #e9e9e9' }}>Export Reference &nbsp;&nbsp;
                                            <span>
                                                    {getFieldDecorator('exportReference', {
                                                        initialValue: dataSource.exportReference
                                                    })(
                                                        <Input maxLength="200" disabled={dataSource.status == "2" || dataSource.status == "3" ? true : this.props.disabled} style={{ width: '75%', marginTop: 5, marginBottom: 5, textAlign: 'center' }} />
                                                        )}
                                                </span>
                                            </div>
                                        </div>
                                    </div>

                                    <div style={Object.assign({}, { lineHeight: 2 }, columnBreak)}>
                                        <div style={{ width: '45%', marginLeft: 10, borderRight: '1px solid #e9e9e9' }}>
                                            <div>Consignee &nbsp;&nbsp;
                                            <span>
                                                    {getFieldDecorator('consignee', {
                                                        initialValue: dataSource.consignee
                                                    })(
                                                        <Input.TextArea maxLength="100" disabled={dataSource.status == "2" || dataSource.status == "3" ? true : this.props.disabled} style={{ width: '79%', marginTop: 15, marginBottom: 5, textAlign: 'center' }} autosize={{ minRows: 6, maxRows: 9 }} />
                                                        )}
                                                </span>
                                            </div>
                                        </div>
                                        <div style={{ width: '27%', marginLeft: 10, borderRight: '1px solid #e9e9e9' }}>
                                            <div>Pre-Carriage by&nbsp;&nbsp;
                                            <span>
                                                    {getFieldDecorator('preCarriage', {
                                                        initialValue: dataSource.preCarriage
                                                    })(
                                                        <Input maxLength="100" disabled={dataSource.status == "2" || dataSource.status == "3" ? true : this.props.disabled} style={{ width: '95%', marginTop: 5, marginBottom: 5, textAlign: 'center' }} />
                                                        )}
                                                </span>
                                            </div>
                                            <div style={{ borderTop: '1px solid #e9e9e9' }}>Vessel/Voyage Number: &nbsp;&nbsp;
                                                <span>
                                                    {getFieldDecorator('vessel', {
                                                        initialValue: dataSource.vessel
                                                    })(
                                                        <Input maxLength="100" disabled={dataSource.status == "2" || dataSource.status == "3" ? true : this.props.disabled} style={{ width: '95%', marginTop: 5, marginBottom: 5, textAlign: 'center' }} />
                                                        )}
                                                </span>
                                            </div>
                                            {/* <div style={{ borderTop: '1px solid #e9e9e9' }}>Voyage Number &nbsp;&nbsp;
                                            <span>
                                                    {getFieldDecorator('voyageNumber', {
                                                        initialValue: dataSource.voyageNumber
                                                    })(
                                                        <Input maxLength="100" disabled={dataSource.status == "2" || dataSource.status == "3" ? true : this.props.disabled} style={{ width: '95%', marginTop: 5, marginBottom: 5, textAlign: 'center' }} />
                                                        )}
                                                </span>
                                            </div> */}
                                        </div>
                                        <div style={{ width: '28%', marginLeft: 10, borderRight: '1px solid #e9e9e9' }}>
                                            <div>Place Of Receipt &nbsp;&nbsp;
                                            <span>
                                                    {getFieldDecorator('receiptPlace', {
                                                        initialValue: dataSource.receiptPlace
                                                    })(
                                                        <Input maxLength="200" disabled={dataSource.status == "2" || dataSource.status == "3" ? true : this.props.disabled} style={{ width: '95%', marginTop: 5, marginBottom: 5, textAlign: 'center' }} />
                                                        )}
                                                </span>
                                            </div>
                                            <div style={{ borderTop: '1px solid #e9e9e9' }}>Port Of Loading &nbsp;&nbsp;
                                            <span>
                                                    {getFieldDecorator('loadingPort', {
                                                        initialValue: dataSource.loadingPort
                                                    })(
                                                        <Input maxLength="50" disabled={dataSource.status == "2" || dataSource.status == "3" ? true : this.props.disabled} style={{ width: '95%', marginTop: 5, marginBottom: 5, textAlign: 'center' }} />
                                                        )}
                                                </span>
                                            </div>
                                        </div>
                                    </div>

                                    <div style={Object.assign({}, { lineHeight: 2 }, columnBreak)}>
                                        <div style={{ width: '45%', marginLeft: 10, borderRight: '1px solid #e9e9e9' }}>
                                            <div>Notify Party &nbsp;&nbsp;
                                            <span>
                                                    {getFieldDecorator('notifyParty', {
                                                        initialValue: dataSource.notifyParty
                                                    })(
                                                        <Input.TextArea maxLength="100" disabled={dataSource.status == "2" || dataSource.status == "3" ? true : this.props.disabled} style={{ width: '76%', marginTop: 15, marginBottom: 5, textAlign: 'center' }} autosize={{ minRows: 5, maxRows: 6 }} />
                                                        )}
                                                </span>
                                            </div>
                                        </div>
                                        <div style={{ width: '27%', marginLeft: 10, borderRight: '1px solid #e9e9e9' }}>
                                            <div>Port Of Discharge &nbsp;&nbsp;
                                            <span>
                                                    {getFieldDecorator('destinationPort', {
                                                        initialValue: dataSource.destinationPort
                                                    })(
                                                        <Input maxLength="50" disabled={dataSource.status == "2" || dataSource.status == "3" ? true : this.props.disabled} style={{ width: '95%', marginTop: 5, marginBottom: 5, textAlign: 'center' }} />
                                                        )}
                                                </span>
                                            </div>
                                            <div style={{ borderTop: '1px solid #e9e9e9' }}>Number of original B/Ls &nbsp;&nbsp;
                                            <span>
                                                    {getFieldDecorator('originalBilllNum', {
                                                        initialValue: dataSource.originalBilllNum
                                                    })(
                                                        <InputNumber maxLength="11" disabled={dataSource.status == "2" || dataSource.status == "3" ? true : this.props.disabled} style={{ width: '95%', marginTop: 5, marginBottom: 5, textAlign: 'center' }} />
                                                        )}
                                                </span>
                                            </div>
                                        </div>
                                        <div style={{ width: '28%', marginLeft: 10, borderRight: '1px solid #e9e9e9' }}>
                                            <div>Place of Delivery  &nbsp;&nbsp;
                                            <span>
                                                    {getFieldDecorator('deliveryPlace', {
                                                        initialValue: dataSource.deliveryPlace
                                                    })(
                                                        <Input maxLength="300" disabled={dataSource.status == "2" || dataSource.status == "3" ? true : this.props.disabled} style={{ width: '95%', marginTop: 5, marginBottom: 5, textAlign: 'center' }} />
                                                        )}
                                                </span>
                                            </div>
                                            <div style={{ borderTop: '1px solid #e9e9e9' }}>Merchant Declared Value &nbsp;&nbsp;
                                            <span>
                                                    {getFieldDecorator('declaredValue', {
                                                        initialValue: dataSource.declaredValue
                                                    })(
                                                        <Input maxLength="300" disabled={dataSource.status == "2" || dataSource.status == "3" ? true : this.props.disabled} style={{ width: '95%', marginTop: 5, marginBottom: 5, textAlign: 'center' }} />
                                                        )}
                                                </span>
                                            </div>
                                        </div>
                                    </div>


                                    <div style={divWithOutBorderBottom}>
                                        <div style={{ width: '100%', marginLeft: 10, borderRight: '1px solid #e9e9e9', textAlign: 'center' }}>
                                            <div>PARTICULARS FURNISHED BY SHIPPER</div>
                                        </div>
                                    </div>

                                    <div style={divWithOutBorderBottom}>
                                        <div style={{ width: '20%', marginLeft: 10, borderRight: '1px solid #e9e9e9' }}>
                                            <div>Container Nos./Seal Nos.<br/>
                                                    Marks & Nos.
                                                <span>
                                                    {getFieldDecorator('containerNos', {
                                                        initialValue: dataSource.containerNos
                                                    })(
                                                        <Input.TextArea maxLength="50" disabled={dataSource.status == "2" || dataSource.status == "3" ? true : this.props.disabled} style={{ width: '93%', marginTop: 5, marginBottom: 5, textAlign: 'center' }} autosize={{ minRows: 5, maxRows: 7 }}/>
                                                        )}
                                                </span>
                                            </div>
                                            {/* <div>Seal Nos.
                                            <span>
                                                    {getFieldDecorator('sealNos', {
                                                        initialValue: dataSource.sealNos
                                                    })(
                                                        <Input maxLength="50" disabled={dataSource.status == "2" || dataSource.status == "3" ? true : this.props.disabled} style={{ width: '88%', marginTop: 5, marginBottom: 5, textAlign: 'center' }} />
                                                        )}
                                                </span>
                                            </div>
                                            <div>Marks & Nos.
                                            <span>
                                                    {getFieldDecorator('markNos', {
                                                        initialValue: dataSource.markNos
                                                    })(
                                                        <Input maxLength="50" disabled={dataSource.status == "2" || dataSource.status == "3" ? true : this.props.disabled} style={{ width: '88%', marginTop: 5, marginBottom: 5, textAlign: 'center' }} />
                                                        )}
                                                </span>
                                            </div> */}
                                        </div>
                                        <div style={{ width: '15%', marginLeft: 10, borderRight: '1px solid #e9e9e9' }}>
                                            <div>Quantity/Number of
                                            <br /> Packages
                                            <span>
                                                    {getFieldDecorator('packagesNum', {
                                                        initialValue: dataSource.packagesNum
                                                    })(
                                                        <Input.TextArea maxLength="11" disabled={dataSource.status == "2" || dataSource.status == "3" ? true : this.props.disabled} style={{ width: '91%', marginTop: 5, marginBottom: 5, textAlign: 'center' }} autosize={{ minRows: 5, maxRows: 7 }} />
                                                        )}
                                                </span>
                                            </div>
                                        </div>
                                        <div style={{ width: '30%', marginLeft: 10, borderRight: '1px solid #e9e9e9' }}>
                                            <div>Description of Goods
                                            <span>
                                                    {getFieldDecorator('goosDesc', {
                                                        initialValue: dataSource.goosDesc
                                                    })(
                                                        <Input.TextArea maxLength="300" disabled={dataSource.status == "2" || dataSource.status == "3" ? true : this.props.disabled} style={{ width: '95%', marginTop: 5, marginBottom: 5, textAlign: 'center' }} autosize={{ minRows: 7, maxRows: 9 }} />
                                                        )}
                                                </span>
                                            </div>
                                        </div>
                                        <div style={{ width: '15%', marginLeft: 10, borderRight: '1px solid #e9e9e9' }}>
                                            <div>Gross Weight
                                        <br /> KGS
                                            <span>
                                                    {getFieldDecorator('grossWeight', {
                                                        initialValue: dataSource.grossWeight
                                                    })(
                                                        <Input.TextArea maxLength="100" disabled={dataSource.status == "2" || dataSource.status == "3" ? true : this.props.disabled} style={{ width: '91%', marginTop: 5, marginBottom: 5, textAlign: 'center' }} autosize={{ minRows: 5, maxRows: 7 }} />
                                                        )}
                                                </span>
                                            </div>
                                        </div>
                                        <div style={{ width: '20%', marginLeft: 10, borderRight: '1px solid #e9e9e9' }}>
                                            <div>Measurement
                                        <br /> CBM
                                            <span>
                                                    {getFieldDecorator('measurement', {
                                                        initialValue: dataSource.measurement
                                                    })(
                                                        <Input.TextArea maxLength="18" disabled={dataSource.status == "2" || dataSource.status == "3" ? true : this.props.disabled} style={{ width: '92%', marginTop: 5, marginBottom: 5, textAlign: 'center' }} autosize={{ minRows: 5, maxRows: 7 }} />
                                                        )}
                                                </span>
                                            </div>
                                        </div>
                                    </div>

                                    <div style={divWithOutBorderBottom}>
                                        <div style={{ width: '50%', marginLeft: 10, borderRight: '1px solid #e9e9e9' }}>
                                            <div style={{ lineHeight: '20px' }}>Total No.of containers or
                                            <br />packages （in words） :
                                            <span>
                                                    {getFieldDecorator('containerNosDesc', {
                                                        initialValue: dataSource.containerNosDesc
                                                    })(
                                                        <Input.TextArea maxLength="300" disabled={dataSource.status == "2" || dataSource.status == "3" ? true : this.props.disabled} style={{ width: '92%', marginTop: 5, marginBottom: 5, textAlign: 'center' }} autosize={{ minRows: 3, maxRows: 4 }} />
                                                        )}
                                                </span>
                                            </div>
                                        </div>
                                        <div style={{ width: '50%', marginLeft: 10, borderRight: '1px solid #e9e9e9' }}>
                                            <div>SHIPPED ON BOARD DATE : 
                                            <span>
                                                    {getFieldDecorator('etdDate', {
                                                        initialValue: dataSource.etdDate
                                                    })(
                                                        <Input maxLength="20" disabled={dataSource.status == "2" || dataSource.status == "3" ? true : this.props.disabled} style={{ width: '95%', marginTop: 5, marginBottom: 5, textAlign: 'center' }} />
                                                        )}
                                                </span>
                                            </div>
                                        </div>
                                    </div>

                                    <div style={Object.assign({}, { lineHeight: 6, borderBottom: '1px solid #e9e9e9', marginBottom: 20 }, columnBreak)}>
                                        <div style={{ width: '40%', marginLeft: 10, borderRight: '1px solid #e9e9e9' }}>
                                            <div>FREIGHT & CHARGES
                                            <span>
                                                    {getFieldDecorator('freightCharges', {
                                                        initialValue: dataSource.freightCharges
                                                    })(
                                                        <Input.TextArea maxLength="300" disabled={dataSource.status == "2" || dataSource.status == "3" ? true : this.props.disabled} style={{ width: '90%', marginTop: 5, marginBottom: 5, textAlign: 'center' }} autosize={{ minRows: 3, maxRows: 4 }} />
                                                        )}
                                                </span>
                                            </div>
                                            <div style={{ borderTop: '1px solid #e9e9e9' }}>Agent's Address at Destination :
                                            <span>
                                                    {getFieldDecorator('destinationPortAgency', {
                                                        initialValue: dataSource.destinationPortAgency
                                                    })(
                                                        <Input.TextArea maxLength="300" disabled={dataSource.status == "2" || dataSource.status == "3" ? true : this.props.disabled} style={{ width: '90%', marginTop: 5, marginBottom: 5, textAlign: 'center' }} autosize={{ minRows: 7, maxRows: 8 }} />
                                                        )}
                                                </span>
                                            </div>
                                        </div>
                                        <div style={{ width: '60%', marginLeft: 10, borderRight: '1px solid #e9e9e9', lineHeight: '20px' }}>
                                            <div>
                                                Received in apparent good order and condition except as otherwise noted the total number of containers or other packages or units enumerated below for  transportation from the place of receipt to the place of delivery subject to the terms and conditions hereof.
                                        One of the Bills of Lading must be surrendered duly endorsed in exchange for the goods or delivery order.
                                        On presentation of this document duly endorsed to Carrier by or on behalf of the Holder of the Bill of Lading, the rights and liabilities arising in accordance with the terms and conditions here of shall, without prejudice to any rule of common law or statute rendering them binding on the Merchant, become binding in all respects between the Carrier and the Holder of the Bill of Lading as though the contract evidenced hereby had been made between them.
                                        IN WITNESS whereof the number of original Bill of Lading stated under have been signed all of this tenor and date, one of which being accomplished.
                                        The other(s) is to be void.
                                        </div>
                                            <div style={{ borderTop: '1px solid #e9e9e9' }}>PLACE & DATE OF ISSUE : &nbsp;&nbsp;
                                            <span>
                                                    {getFieldDecorator('issuePlace', {
                                                        initialValue: dataSource.issuePlace
                                                    })(
                                                        <Input maxLength="300" disabled={dataSource.status == "2" || dataSource.status == "3" ? true : this.props.disabled} style={{ width: '67%', marginTop: 5, marginBottom: 5, textAlign: 'center' }} />
                                                        )}
                                                </span>
                                            </div>
                                            {/* <div style={{ borderTop: '1px solid #e9e9e9' }}>DATE OF ISSUE &nbsp;&nbsp;
                                            <span>
                                                    {getFieldDecorator('issueDate', {
                                                        initialValue: dataSource.issueDate
                                                    })(
                                                        <Input maxLength="20" disabled={dataSource.status == "2" || dataSource.status == "3" ? true : this.props.disabled} style={{ width: '78%', marginTop: 5, marginBottom: 5, textAlign: 'center' }} />
                                                        )}
                                                </span>
                                            </div> */}
                                            <div style={{ borderTop: '1px solid #e9e9e9' }}>Agent for the Carrier: &nbsp;&nbsp;
                                            <span>
                                                    {getFieldDecorator('carrierAgency', {
                                                        initialValue: dataSource.carrierAgency
                                                    })(
                                                        <Input.TextArea maxLength="300" disabled={dataSource.status == "2" || dataSource.status == "3" ? true : this.props.disabled} style={{ width: '72%', marginTop: 5, marginBottom: 5, textAlign: 'center' }} autosize={{ minRows: 3, maxRows: 4 }} />
                                                        )}
                                                </span>
                                            </div>
                                        </div>
                                    </div>
                                </div>                        
                            </div>
                        </TabPane>
                    </Tabs>
                    {dataSource.status == "2" || dataSource.status == "3" ?
                        <Tabs tabPosition={'top'}>
                            <TabPane tab="提单补料凭证" key="1">
                                <Row>
                                    <Col span={4} style={{ marginLeft: 90,  marginTop: 10, marginBottom: 10 }}>
                                        <a href="#" onClick={this.ExportBillOfLading.bind(this)}>导出提单补料确认件</a>
                                    </Col>
                                </Row>
                                <Row>
                                    <Col span={12}>
                                        <FormItem {...formItemLayout} label={<span className="ant-form-item-required">提单确认件</span>} hasFeedback>
                                            <SingleDragger url={ladingBillUrl} ref="ladingBillUrl" dataSource={dataSource} module={Constants.ORDERSI_MODULES[0]} disabled={dataSource.status == "3" ? true : this.props.disabled} />
                                        </FormItem>
                                    </Col>
                                </Row>
                            </TabPane>
                        </Tabs>
                    : ""}
                </Form>
            </div>
                )
    }
})

function mapStateToProps(state) {
    return {
                    loading: state.loading.models.order, order: state.order
    };
}

export default connect(mapStateToProps)(orderSupplementInfo);